get_or_default

pure function <R: +V> get_or_default(key: K, default: R): R

Gets the value associated with a key in the map, or a default value if the key is not found.

Return

The value associated with the key, or the default value if the key is not found.

Since

0.11.0

Parameters

key

The key to look up.

default

lazily evaluated default value to return if the key is not found.